<?php

namespace app\admin\model\information;
use think\Model;

class Oausersuperior extends Model
{
    protected $connection = "database.forth";
    protected $table = "user_superior";
    
    public static function getSuperior($user_id){
        if(!$user_id){
            exception('获取上级user_id参数错误');
        }
        $superior_user_id = self::where('user_id',$user_id)->value('superior_user_id');
        if(!$superior_user_id){
            exception('获取上级user_id失败，返回空');
        }
        return $superior_user_id;
    }
}
